From d65cea3a8e2ec16eb6d33e0cde584038be34ba04 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Thu, 22 Sep 2005 17:13:56 +0000 Subject: [PATCH] Add more an1 road types, clarify docs --- gpsbabel/README | 22 +++++++++++++++++++--- gpsbabel/an1.c | 16 ++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/gpsbabel/README b/gpsbabel/README index cba352a24..683718ff2 100644 --- a/gpsbabel/README +++ b/gpsbabel/README @@ -953,7 +953,23 @@ THE FORMATS If you are creating a road layer, you may also use the "road" option, which allows you to change the types of roads based on their names. You can change multiple roads at the same time. Currently supported - types are "limited", "toll", "us", "state", "major", and "local". + types are + + limited Limited-access freeways + toll Limited-access toll highways + ramp Access ramps for limited-access highways + us National highways (e.g. US routes) + primary Primary State/Provincial routes + state State/Provincial routes + major Major Connectors + ferry Ferry Routes + local Local Roads + editable User-drawn Roads + + GPSBabel defaults to creating editable roads. These are routed just + like local roads, but may be edited with the drawing tools in Street + Atlas. + This option has a special format that is best demonstrated by example: "road=I-599!limited!Beecher St.!major" @@ -961,8 +977,8 @@ THE FORMATS This option will cause any road named "I-599" to become a limited- access highway and any road named "Beecher St." to become a major connector. Note that roads that have had their types changed in - this way might not be editable in Street Atlas, so make sure they - are where you want them before you change them, and make sure to keep + this way are not editable in Street Atlas, so make sure they are + where you want them before you change them, and make sure to keep a backup of your original road layer. Note that the ! is a shell metacharacter in bash and possibly other shells, so you may have to use single quotes or some other escape mechanism. diff --git a/gpsbabel/an1.c b/gpsbabel/an1.c index d8e93ecf6..7ab321d3f 100644 --- a/gpsbabel/an1.c +++ b/gpsbabel/an1.c @@ -904,9 +904,25 @@ Parse_Change_Type( char *type ) { else if ( !case_ignore_strcmp( type, "state" )) { retval = 0x11070c10; } + else if ( !case_ignore_strcmp( type, "primary" )) { + /* primary state/provincial routes */ + retval = 0x11070840; + } else if ( !case_ignore_strcmp( type, "major" )) { retval = 0x11070c30; } + else if ( !case_ignore_strcmp( type, "local" )) { + retval = 0x11071010; + } + else if ( !case_ignore_strcmp( type, "ramp" )) { + retval = 0x11070cb0; + } + else if ( !case_ignore_strcmp( type, "ferry" )) { + retval = 0x11070ca0; + } + else if ( !case_ignore_strcmp( type, "editable" )) { + retval = 0x11100541; + } else { fatal( MYNAME ": unknown road type for road changes\n" ); } -- 2.30.2